<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@taglib prefix="s" uri="/struts-tags"%>
<%@ taglib prefix="pg" uri="http://jsptags.com/tags/navigation/pager"%>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
<%@ taglib prefix="my" uri="/WEB-INF/my.tld"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
	<head>
		<title>初审项目审核页面</title>
		<link rel="stylesheet" type="text/css" href="../../css/counter.css">
		<link rel="stylesheet" type="text/css" href="../../css/css.css">
		<script type="text/javascript" src="../../javascript/common.js"></script>
		<script src="<%=basePath%>/javascript/jquery.js"></script>
		<script type="text/javascript">
		function toReviewPage(xmId,xkId,pageroffset,xmpxpjf)
		{
		var str=0;
		str=$("#allowReviewFlagId").val();
		 if(str>0)
		 {
		  alert("还有专家未对所有项目进行评分，不能进行审核！");
		 }
		 else{
		 window.location="listBasicInfoInfoForReview2.action?xmId="+xmId+"&xkId="+xkId+"&pageroffset="+pageroffset+"&xmpxpjf="+xmpxpjf;
		 }
		}
		
		function toViewPage(xmId,fzqzzf,xmzzpjf,xmzf,xmpjf,xkId)
		{
		    window.location="viewBasicInfoInfoForReview2.action?xmId="+xmId+"&fzqzzf="+fzqzzf+"&xmzzpjf="+xmzzpjf+"&xmzf="+xmzf+"&xmpjf="+xmpjf+"&xkId="+xkId;
		}
		
		function returnXkList()
		{
		window.location="listXkForReview2.action";
		}
		
		function exportList()
           {
           if(confirm('确认导出评分结果吗？请确认是否为最终结果列表！'))
               window.location.href('exportTblXmfs2.action?xkId=${xkId}');
           }
		
		/**
		强制刷新历史页面的代码
		
		function init()
		{
		if(self.name != "scoresList"){
           self.name = "scoresList";
           self.location.reload();
         }
          //如果是指定字符串，表示刷新过了，就清空window.name，以备下次进入页面再强制刷新。
        else{
           self.name = ""
        }
		}
		**/
		</script>
		<style type="text/css">
.buttonface {
	background:#999 url(../../images/21_08.gif);
	background-repeat:repeat;
	border: none;
	COLOR: #4c4c4c;
	FONT-SIZE: 12px;
	FONT-STYLE: normal;
	FONT-VARIANT: normal;
	FONT-WEIGHT: normal;
	width: 69px;
	HEIGHT: 21px;
	LINE-HEIGHT: normal;
	cursor:pointer;
}
</style>
	</head>
	<body>
		<s:set name="allowReviewFlag" value="0" scope="page"></s:set>
		<pg:pager url="listReview2Fs.action" maxPageItems="10"
			maxIndexPages="5" isOffset="false"
			export="pageOffset,currentPageNumber=pageNumber" scope="request"
			items="${fn:length(erm2List)}">
			<pg:param name="xkId" />
			<TABLE cellSpacing="0" cellPadding="0" width="100%" align="center"
				border="0">
				<TBODY>
					<TR>
						<TD>
							<IMG src="../../images/manage/arron1.gif">
							<FONT class="font_lv">${xmTitle}&nbsp;&nbsp;应评专家数：${shouldReviewExpertCount}人</FONT>&nbsp;&nbsp;&nbsp;
							<input type="button" value="返回" class="buttonface"
								onclick="returnXkList()" />
							&nbsp;&nbsp;&nbsp;&nbsp;
							<s:if test="${!empty erm2List}">
								<input type="button" value="导出列表" class="buttonface"
									onclick="exportList()" />
							</s:if>
						</TD>
						<td align="right">
						</td>
					</TR>
				</TBODY>
			</TABLE>
			<TABLE cellSpacing="1" cellPadding="1" width="100%" align="center"
				border="0">
				<tr>
					<td>
					</td>
					<td align="right">
						<b>分页</b>>>>&nbsp;共${fn:length(erm2List)}条记录&nbsp;&nbsp;每页10条记录
						<pg:index>
							<pg:first>
								<a href="${pageUrl}">首页</a>
							</pg:first>
							<pg:prev>
								<a href="${pageUrl }">前页</a>
							</pg:prev>
							<pg:skip pages="-5">
								<a href="${pageUrl}">&lt;&lt;&lt;</a>
							</pg:skip>
							<pg:skip pages="-1">
								<a href="${pageUrl}">&lt;&lt;</a>
							</pg:skip>
							<pg:pages>
								<s:if test="${currentPageNumber eq pageNumber }">
									<font color="red">${pageNumber }</font>
								</s:if>
								<s:else>
									<a href="${pageUrl }">${pageNumber }</a>
								</s:else>
							</pg:pages>
							<pg:skip pages="1">
								<a href="${pageUrl}">&gt;&gt;</a>
							</pg:skip>
							<pg:skip pages="5">
								<a href="${pageUrl}">&gt;&gt;&gt;</a>
							</pg:skip>
							<pg:next>
								<a href="${pageUrl }">后页</a>
							</pg:next>
							<pg:last>
								<a href="${pageUrl }">尾页</a>
							</pg:last>
						</pg:index>
					</td>
				</tr>
			</table>
			<TABLE cellSpacing="1" cellPadding="1" width="100%" border="0">
				<TR>
					<TD class=line>
						<table height="100%" cellSpacing=1 cellPadding=2 width="100%"
							bgColor=#CCCCCC border=0>
							<tr>
								<td align="center" width="5%"
									background="../../images/manage/title_bg.jpg"
									class="font_12_B_w">
									序号
								</td>
								<td align="center" width="15%"
									background="../../images/manage/title_bg.jpg"
									class="font_12_B_w">
									项目名称
								</td>
								<td align="center" width="10%"
									background="../../images/manage/title_bg.jpg"
									class="font_12_B_w">
									专利权人
								</td>
								<td align="center" width="8%"
									background="../../images/manage/title_bg.jpg"
									class="font_12_B_w">
									已评专家数
								</td>
								<td align="center" width="10%"
									background="../../images/manage/title_bg.jpg"
									class="font_12_B_w">
									总分(计算权重)
								</td>

								<td align="center" width="8%"
									background="../../images/manage/title_bg.jpg"
									class="font_12_B_w">
									排序平均分
								</td>
								<td align="center" width="16%"
									background="../../images/manage/title_bg.jpg"
									class="font_12_B_w">
									专业组
								</td>
								<td align="center" width="8%"
									background="../../images/manage/title_bg.jpg"
									class="font_12_B_w">
									审核状态
								</td>
								<td align="center" width="20%"
									background="../../images/manage/title_bg.jpg"
									class="font_12_B_w">
									操作
								</td>
							</tr>
							<s:if test="${!empty erm2List}">
								<s:iterator value="erm2List" status="sm">
									<pg:item>
										<tr bgColor=#FFFFFF height="25">
											<td align="center">
												<s:property value="${sm.count}" />
											</td>
											<td align="center">
												<s:property value="basicInfoName" />
												<br />
											</td>
											<td align="center">
												<s:property value="zlqr" />
											</td>
											<td align="center">
												<s:property value="alreadyReviewExpertCount" />
												<s:if
													test="${alreadyReviewExpertCount ne shouldReviewExpertCount}">
													<s:set name="allowReviewFlag" value="${allowReviewFlag}+1" />
												</s:if>
											</td>
											<td align="center">
												<s:property value="fzqzzf" />
											</td>
											<td align="center">
												<s:property value="xmpxpjf" />
											</td>
											<td align="center">
												<s:property value="xkName" />
												组
											</td>
											<td align="center">
												<s:if test="${state eq 0}">
										 未审核
										</s:if>
												<s:else>
													<font color="red">审核完成</font>
												</s:else>
												<br>
											</td>
											<td align="center">
												<s:if test="${alreadyThirdReview eq true}">
													<input type="button" value="查看评分" class="buttonface"
														onclick="openWin('listReview2Expert.action?xmId=${basicInfoId}&xkId=${xkId}&viewExpertReview=true','listReview2Expert',540,400,1)" />
													<input type="button" value="查看审核" class="buttonface"
														onclick="toViewPage('${basicInfoId}','${fzqzzf}','${xmzzpjf}','${xmzf}','${xmpjf}','${xkId}')" />
												</s:if>
												<s:else>
													<s:if test="${my:checkYear()}">
														<s:if test="${state eq 0}">
															<input type="button" value="专家评分" class="buttonface"
																onclick="openWin('listReview2Expert.action?xmId=${basicInfoId}&xkId=${xkId}&viewExpertReview=false','listReview2Expert',540,400,1)" />
															<input type="button" value="进行审核" class="buttonface"
																onclick="toReviewPage('${basicInfoId}','${xkId}','${pageroffset}','${xmpxpjf}')" />

														</s:if>
													</s:if>
													<s:if test="${state eq 1}">
														<input type="button" value="查看评分" class="buttonface"
															onclick="openWin('listReview2Expert.action?xmId=${basicInfoId}&xkId=${xkId}&viewExpertReview=true','listReview2Expert',540,400,1)" />
														<input type="button" value="查看审核" class="buttonface"
															onclick="toViewPage('${basicInfoId}','${fzqzzf}','${xmzzpjf}','${xmzf}','${xmpjf}','${xkId}')" />
													</s:if>
												</s:else>
											</td>
										</tr>
									</pg:item>
								</s:iterator>
							</s:if>
							<s:else>
								<tr>
									<td colspan="9" align="center">
										还没有评审，请等待！
									</td>
								</tr>
							</s:else>
						</table>
					</td>
				</tr>
			</table>
		</pg:pager>
		<input type="hidden" id="allowReviewFlagId" value="${allowReviewFlag}" />
	</body>
</html>
